package com.bdqn.ch05.sz.sz2;

public class Printer {
    private Ink ink = null;
    private Paper paper = null;
    /**
     * 打印方法
     */
    public void print(String message){
        System.out.println("使用"+ink.getColor(255,200,0)+"颜色打印:\n");
        //逐字打印输出到纸张
        for (int i = 0; i <message.charAt(i) ; i++) {
            paper.putinChar(message.charAt(i));
        }
        System.out.println(paper.getContent());
    }
    public void setInk(Ink ink){
        this.ink = ink;
    }
    public void setPaper(Paper paper){
        this.paper = paper;
    }

}
